package com.winshare.saleAssistant.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.winshare.saleAssistant.model.UserLoginLog;
import com.winshare.saleAssistant.modelVo.LoginCountVo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 登录日志 Mapper 接口
 * </p>
 *
 * @author stylefeng
 * @since 2020-11-16
 */
public interface UserLoginLogMapper extends BaseMapper<UserLoginLog> {
    List<UserLoginLog> selectListByPCA(@Param("province") String province, @Param("city") String city, @Param("areaName") String areaName);

    int getTUserLogCount(@Param("starTime") Date starTime, @Param("endTime") Date endTime, @Param("productName") String productName);

    int getLoginLogTotatol(@Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    List<UserLoginLog> getHighTime(@Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    Map<String, Object> getloginDiscount(@Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    List<LoginCountVo> getMonthAccount(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    List<LoginCountVo> getAvgTime(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime);

    List<Map<String, Object>> getPALogin(@Param("productName") String productName, @Param("starTime") Date starTime, @Param("endTime") Date endTime, @Param("orderBy") String orderBy);

    List<UserLoginLog> getSchoolCountTime(@Param("provinceName") String provinceName, @Param("cityName") String cityName, @Param("areaName") String areaName, @Param("productName") String productName,
                                          @Param("starTime") Date starTime, @Param("endTime") Date endTime, @Param("dataType") String dataType);

    String getSynchronousTime();
}
